﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="AttendencePlanExport.aspx.cs"
    Inherits="Page_AttendencePlanExport" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<%@ Register Src="~/Control/Order.ascx" TagName="Order" TagPrefix="wsc" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <link href="~/Style/Css/Css.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="/Attendences.Web/Js/jquery.js"></script>

    <link href="../Style/Css/calendar.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../Js/calendar.js"></script>

    <style type="text/css">
        *
        {
            margin: 0px;
            padding: 0px;
        }
        body
        {
            cursor: auto;
        }
        html
        {
            overflow: hidden;
        }
        #sideBar
        {
            width: 100%;
            overflow: hidden;
        }
        #main
        {
            overflow: auto;
        }
        #toggleBar, .div
        {
            width: 3px;
            height: 100%;
            overflow: hidden;
            background: #F1F6FC;
            cursor: e-resize;
            border-left: 1px solid #99BBE8;
            border-right: 1px solid #99BBE8;
        }
        td
        {
            display: block;
            overflow: auto;
            word-break: break-all;
        }
        #mainUD
        {
            overflow: auto;
        }
        #toggleBarUD, .divUD
        {
            height: 3px;
            width: 100%;
            overflow: hidden;
            background: #F1F6FC;
            cursor: n-resize;
            border-top: 1px solid #99BBE8;
            border-bottom: 1px solid #99BBE8;
        }
        .btn
        {
            border-right: #2C59AA 1px solid;
            padding-right: 2px;
            border-top: #2C59AA 1px solid;
            padding-left: 2px;
            font-size: 12px;
            filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#C3DAF5);
            border-left: #2C59AA 1px solid;
            cursor: hand;
            color: black;
            padding-top: 2px;
            border-bottom: #2C59AA 1px solid;
        }
    </style>

    <script type="text/javascript">
        function SelectUser() {
            var returnValue = window.showModalDialog("Function.Web/UserChooser.aspx?SelectType=User&nocache=" + Math.random() * 10000 + "&ReturnValueFormat="
            + encodeURI("txtID:ID|txtName:Name|txtDisplay:DisplayName"),
            document, "dialogWidth:800px;dialogHeight:600px;status:yes;resizable:no");
        }
        function SelectDepatment() {
            var returnValue = window.showModalDialog("Function.Web/UserChooser.aspx?SelectType=Department&nocache=" + Math.random() * 10000 + "&ReturnValueFormat="
            + encodeURI("txtDeptID:ID|txtDeptName:Name|txtDeptDisplay:DisplayName"),
            document, "dialogWidth:800px;dialogHeight:600px;status:yes;resizable:no");
        }
        function OverChangeClass(obj) {
            if (obj.className != "Cur")
                obj.className = 'Over'
        }
        function ReturnClass(obj) {
            obj.className = obj.oldclass;
        }
    </script>

</head>
<body scroll="no">
    <form id="form1" runat="server">
    <div>
        <table cellspacing="0" cellpadding="0" border="0" class="MainTable" width="100%"
            height="100%" style="">
            <tr>
                <td width="1">
                </td>
                <td id="main" valign="top">
                    <div id="sideBar">
                        <table cellspacing="0" cellpadding="0" border="0" class="" width="100%">
                            <tr>
                                <td class="TitleBar">
                                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                        <tr>
                                            <td class="MainTitle">
                                                值班人员统计
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr class="AdvancedSearch">
                                <td class="ToolBar" colspan="2">
                                    <table>
                                        <tr valign="middle">
                                            <td>
                                                &nbsp;&nbsp;值班日期
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" onfocus="calendar();" ID="txtStartDate" CssClass="WSCL_Input"
                                                    Width="90px"></asp:TextBox>
                                            </td>
                                            <td>
                                                -
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" onfocus="calendar();" ID="txtEndDate" CssClass="WSCL_Input"
                                                    Width="90px"></asp:TextBox>
                                            </td>
                                            <td>
                                                &nbsp;&nbsp;人员名称：
                                            </td>
                                            <td colspan="3">
                                                <asp:TextBox runat="server" ID="txtDisplay" CssClass="WSCL_Input" onclick="SelectUser()"
                                                    Width="90px"></asp:TextBox>
                                                <asp:HiddenField runat="server" ID="txtID" />
                                                <asp:HiddenField runat="server" ID="txtName" />
                                            </td>
                                            <td>
                                                &nbsp;&nbsp;部门名称：
                                            </td>
                                            <td colspan="3">
                                                <asp:TextBox runat="server" ID="txtDeptDisplay" CssClass="WSCL_Input" onclick="SelectDepatment()"
                                                    Width="90px"></asp:TextBox>
                                                <asp:HiddenField runat="server" ID="txtDeptID" />
                                                <asp:HiddenField runat="server" ID="txtDeptName" />
                                            </td>
                                            <td class="ToolMenu">
                                                <div class="Normal" oldclass="Normal" style="float: left; width: 70px; padding-top: 2px;
                                                    padding-bottom: 2px" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)">
                                                    <asp:LinkButton runat="server" ID="lbtnSearch" OnClick="lbtnSearch_Click"><span><img src="../Images/Icon/Action/Icon-Search.png" alt="查询" /></span><span>查询</span></asp:LinkButton>
                                                </div>
                                            </td>
                                            <td class="ToolMenu">
                                                <div class="Normal" oldclass="Normal" style="float: left; width: 70px" onmouseover="OverChangeClass(this);"
                                                    onmouseout="ReturnClass(this)">
                                                    <a href="javascript:window.print();"><span>
                                                        <img src="../Images/Icon/Action/print.gif" alt="打印" /></span><span>打印</span></a>
                                                </div>
                                            </td>
                                            <td colspan="2" class="ToolMenu">
                                                <div class="Normal" oldclass="Normal" style="float: left; width: 70px" onmouseover="OverChangeClass(this);"
                                                    onmouseout="ReturnClass(this)">
                                                    <asp:LinkButton runat="server" ID="lbtnExport" OnClick="lbtnExport_Click"><span><img src="../Images/Icon/Action/import.gif" alt="导出" /></span><span>导出</span></asp:LinkButton>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                        <tr>
                                            <td>
                                                <wsc:Order ID="odList" runat="server"></wsc:Order>
                                                <!--List Header-->
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                               <tr>
                                <td style="text-align:center">
                                    <asp:Chart ID="chart" runat="server" Palette="BrightPastel" ImageType="Png" ImageUrl="~/TempImages/ChartPic_#SEQ(300,3)"
                                        BackColor="#D3DFF0" Width="832px" Height="280px" borderlinestyle="Solid" backgradienttype="TopBottom"
                                        BorderlineWidth="2" BorderlineColor="181, 64, 1">
                                        <Titles>
                                            <asp:Title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 14.25pt, style=Bold" ShadowOffset="3"
                                                Text="值班人员统计" Alignment="TopLeft" ForeColor="26, 59, 105" Name="Title1">
                                            </asp:Title>
                                        </Titles>
                                        <Legends>
                                            <asp:Legend Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold"
                                                Enabled="False" TitleFont="Microsoft Sans Serif, 8pt, style=Bold">
                                            </asp:Legend>
                                        </Legends>
                                        <BorderSkin SkinStyle="Emboss"></BorderSkin>
                                        <Series>
                                        </Series>
                                        <ChartAreas>
                                            <asp:ChartArea Name="ca" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White"
                                                BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
                                                <AxisY LineColor="64, 64, 64, 64" IsLabelAutoFit="False">
                                                    <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold"></LabelStyle>
                                                    <MajorGrid LineColor="64, 64, 64, 64"></MajorGrid>
                                                </AxisY>
                                                <AxisX LineColor="64, 64, 64, 64" IsLabelAutoFit="False">
                                                    <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold"></LabelStyle>
                                                    <MajorGrid LineColor="64, 64, 64, 64"></MajorGrid>
                                                </AxisX>
                                            </asp:ChartArea>
                                        </ChartAreas>
                                    </asp:Chart>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div id="MainList" style="width: 100%; overflow: auto;" class="ScrollDiv">
                                        <table cellspacing="0" cellpadding="0" border="0" class="PageGridHeader" width="100%">
                                            <tr class="Normal">
                                                <td width="40" align="center">
                                                </td>
                                                <td width="150" align="center">
                                                    值班人员
                                                </td>
                                                <%--                                                <td width="150" align="center">
                                                    日期
                                                </td>
                                                <td>
                                                    时间
                                                </td>--%>
                                                <td align="center" width="120px">
                                                    值班次数
                                                </td>
                                                <td align="center" visible="false">
                                                </td>
                                            </tr>
                                        </table>
                                        <div style="height: 120px; width: 100%; overflow-y: scroll">
                                            <table width="100%" class="MainInfolist">
                                                <asp:Repeater runat="server" ID="rptInfo">
                                                    <ItemTemplate>
                                                        <tr class="Normal">
                                                            <td width="40" align="center">
                                                                <%#Container.ItemIndex+1%>
                                                            </td>
                                                            <td width="150" align="left">
                                                                <%#Eval("UserDisplayName") %>
                                                            </td>
                                                            <%--                                                        <td width="150" align="center">
                                                            <%#Eval("AttendDate") %>
                                                        </td>
                                                        <td>
                                                            <%#Eval("AttendTime") %>
                                                        </td>--%>
                                                            <td>
                                                                <%#Eval("DataCount") %>
                                                            </td>
                                                        </tr>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                                <tr>
                                                    <td>
                                                        小计:
                                                    </td>
                                                    <td colspan="2">
                                                        <asp:Label runat="server" Text="0" ID="lbCount"></asp:Label>人
                                                    </td>
                                                </tr>
                                            </table>
                                            <div style="width: 100%">
                                            </div>
                                        </div>
                                </td>
                            </tr>
                         
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
